package com.qk.controller;

import com.qk.common.PageResult;
import com.qk.common.Result;
import com.qk.dto.OperateLogDto;
import com.qk.entity.OperateLog;
import com.qk.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/logs")
public class OperateLogController {
    @Autowired
    private OperateLogService operateLogService;

    @GetMapping
    public Result list(OperateLogDto operateLogDto){
        log.info("查询操作日志列表");
        PageResult<OperateLog> pageResult = operateLogService.listAll(operateLogDto);
        return Result.success(pageResult);

    }
}
